// $codepro.audit.disable
package edu.gatech.oad.cyberdoc.view.menu;

import javax.swing.JPanel;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import java.awt.Component;
import javax.swing.Box;

import edu.gatech.oad.cyberdoc.presenter.Presenter;
import edu.gatech.oad.cyberdoc.view.MainFrame;

import java.awt.Dimension;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class NurseMenu extends JPanel {

	/**
	 * Create the panel.
	 */
	public NurseMenu() {
		setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		JButton btnViewAppointments = new MenuButton("View Appointments");
		btnViewAppointments.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().viewAppointment();
			}
		});
		add(btnViewAppointments);

		JButton btnPatientList = new MenuButton("Patient List");
		btnPatientList.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().viewUsers();			}
		});
		add(btnPatientList);

		JButton btnCreateTreatmentRecord = new MenuButton("Create Treatment Record");
		btnCreateTreatmentRecord.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				Presenter.getInstance().viewTreatmentRecord();
			}
		});
		add(btnCreateTreatmentRecord);

		Component rigidArea = Box.createRigidArea(new Dimension(0, 20));
		add(rigidArea);

		JButton btnLogout = new MenuButton("Logout");
		btnLogout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Presenter.getInstance().logout();
			}
		});
		add(btnLogout);

	}

}
